﻿Imports DAO
Imports DTO
Public Class KhoHangBUS
    Public Shared Function LoadBangKhoHang() As DataTable
        Return KhoHangDAO.LoadBangKhoHang
    End Function

    Public Shared Function LayDSKhoHang() As DataTable
        Return KhoHangDAO.LayDSKhoHang()
    End Function

    Public Shared Function ThemKhoHang(kh As KhoHangDTO) As Boolean
        Dim kt As Boolean = True
        If kh.TenKhoHang.Length = 0 Then
            Return False
        End If
        KhoHangDAO.ThemKhoHang(kh)
        Return kt
    End Function

    Public Shared Function CapNhatKhoHang(kh As KhoHangDTO) As Boolean
        Dim kt As Boolean = True
        If kh.TenKhoHang.Length = 0 Then
            Return False
        End If
        KhoHangDAO.CapNhatKhoHang(kh)
        Return kt
    End Function

    Public Shared Function XoaKhoHang(kh As KhoHangDTO) As Boolean
        Dim kt As Boolean = True
        KhoHangDAO.XoaKhoHang(kh)
        Return kt
    End Function

    Public Shared DongKetNoi As SqlClient.SqlConnection = CKetNoi.Connect

End Class
